/**
 * 产品管理
 */
import request from '@/utils/request'

/**
 * @method orderList
 * @description 订单列表
 */
export function orderList(data) {
	return request({
		url: '/mall/admin/order/list',
		method: 'post',
		data: data
	})
}

/**
 * @method orderDetail
 * @description 订单详情
 */
export function orderDetail(params) {
	return request({
		url: '/mall/admin/order/order_detail',
		method: 'get',
		params: params
	})
}

/**
 * @method orderError
 * @description 订单异常
 */
export function orderError(params) {
	return request({
		url: '/mall/admin/order_error/error_item',
		method: 'get',
		params: params
	})
}

/**
 * @method confirmOrderError
 * @description 处理订单异常
 */
export function confirmOrderError(data) {
	return request({
		url: '/mall/admin/order_error/confirm',
		method: 'post',
		data: data
	})
}

/**
 * @method confirmOrder
 * @description 商家主动确认收货
 */
export function confirmOrder(data) {
	return request({
		url: '/mall/admin/order/confirm_order',
		method: 'post',
		data: data
	})
}

/**
 * @method orderRemark
 * @description 设置订单备注
 */
export function orderRemark(data) {
	return request({
		url: '/mall/admin/order/remark',
		method: 'post',
		data: data
	})
}

/**
 * @method orderPickUp
 * @description 商品提货
 */
export function orderPickUp(data) {
	return request({
		url: '/mall/admin/order/confirm_pickup',
		method: 'post',
		data: data
	})
}

/**
 * @method orderDeliver
 * @description 商品发货
 */
export function orderDeliver(data) {
	return request({
		url: '/mall/admin/order/deliver_goods',
		method: 'post',
		data: data
	})
}

/**
 * @method orderRefund
 * @description 商品退款
 */
export function orderRefund(data) {
	return request({
		url: '/mall/admin/order/refund',
		method: 'post',
		data: data
	})
}

/**
 * @method orderCancel
 * @description 商品取消
 */
export function orderCancel(data) {
	return request({
		url: '/mall/admin/order/cancel',
		method: 'post',
		data: data
	})
}

/**
 * @method putSealTicket
 * @description 打印小票
 */
export function putSealTicket(data) {
	return request({
		url: '/mall/admin/order/printOrder?orderNo=' + data.orderNo,
		method: 'post',
		data: {}
	})
}
// 获取退款列表
export function qryRefundRecord(data) {
	return request({
		url: '/order_mobile/trade/qryRefundRecord',
		method: 'post',
		data
	})
}

/**
 * @method
 * @description 快递相关
 */
export function getExpressName(params) {
	return request({
		url: '/mall/admin/getExpressName',
		method: 'get',
		params: params
	})
}
